<?php

namespace App\Laravue\Models;

use Illuminate\Database\Eloquent\Model;

class examineFlow extends Model
{
    //
    public $table='examine_flow';

    public function step(){
        return $this->hasMany(examineStep::class,'flow_id','id');
    }

    //根据 type 返回 审核流id
    public static function getFlowIdByType($type)
    {
        $one=self::where([['types',$type],['status','1']])->first();
        return $one->id;
    }




}
